package com.school.information.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.school.information.entity.BasicSchoolEntity;
import com.school.information.qo.BasicSchoolQO;

import java.util.List;

/**
 * (BasicSchool)表服务接口
 *
 * @author ycc
 * @since 2023-11-07 14:44:46
 */
public interface BasicSchoolService extends IService<BasicSchoolEntity> {

    /**
     * 分页查询学校信息
     *
     * @param basicSchoolQO
     * @return
     */
    IPage<BasicSchoolEntity> pageList(BasicSchoolQO basicSchoolQO);

    /**
     * 获取最大编码
     *
     * @return
     */
    String getMaxCode();

    /**
     * 新增学校信息
     *
     * @param basicSchool
     * @return
     */
    boolean saveInfo(BasicSchoolEntity basicSchool);

    /**
     * 根据学校编码，查询学校信息
     *
     * @param code
     * @return
     */
    BasicSchoolEntity getByCode(String code);

    /**
     * 根据学校名称，查询学校信息
     *
     * @param name
     * @return
     */
    BasicSchoolEntity getByName(String name);

    /**
     * 更新学校信息
     *
     * @param basicSchool
     * @return
     */
    boolean updateInfo(BasicSchoolEntity basicSchool);

    /**
     * 获取所有学校信息
     *
     * @return
     */
    List<BasicSchoolEntity> findList();

}
